<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网络连接失败</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .error-container {
            background: white;
            border-radius: 20px;
            padding: 40px 30px;
            text-align: center;
            box-shadow: 0 15px 35px rgba(0,0,0,0.1);
            max-width: 400px;
            width: 100%;
        }

        .error-icon {
            font-size: 80px;
            margin-bottom: 20px;
            color: #ff4757;
        }

        h1 {
            color: #2f3542;
            margin-bottom: 15px;
            font-size: 24px;
        }

        p {
            color: #747d8c;
            margin-bottom: 25px;
            line-height: 1.6;
        }

        .retry-btn {
            background: #3742fa;
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 5px;
        }

        .retry-btn:hover {
            background: #2f36d1;
            transform: translateY(-2px);
        }

        .home-btn {
            background: #dfe4ea;
            color: #2f3542;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 5px;
        }

        .home-btn:hover {
            background: #ced6e0;
        }
    </style>
</head>
<body>
<div class="error-container">
    <div class="error-icon">⚠️</div>
    <h1>网络连接失败</h1>
    <p>无法连接到服务器，请检查您的网络连接后重试。</p>
    <button class="retry-btn" onclick="retry()">重新加载</button>
    <button class="home-btn" onclick="goHome()">返回首页</button>
</div>

<script>
    function retry() {
        // 调用 Android 方法重新加载
        if (typeof AndroidBridge !== 'undefined') {
            AndroidBridge.retry();
        } else {
            location.reload();
        }
    }

    function goHome() {
        // 调用 Android 方法返回首页
        if (typeof AndroidBridge !== 'undefined') {
            AndroidBridge.goHome();
        }
    }
</script>
</body>
</html>